<div class="form">

    <?php $form = $this->beginWidget('FActiveForm', array(
    'id' => 'photo-form',
    'enableAjaxValidation' => false,
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>

    <?php if (!$model->IsNewRecord) echo $form->hiddenField($model, "id"); ?>
    <div class="row">
        <?php echo $form->labelEx($model, 'gallery_id'); ?>
        <?php echo $form->textField($model, 'gallery_id', array('size' => 20, 'maxlength' => 20)); ?>
        <?php echo $form->error($model, 'gallery_id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'path'); ?>
        <?php echo $form->textField($model, 'path', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'path'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'description'); ?>
        <?php echo $form->textArea($model, 'description', array('rows' => 6, 'cols' => 50)); ?>
        <?php echo $form->error($model, 'description'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'total_view'); ?>
        <?php echo $form->textField($model, 'total_view', array('size' => 20, 'maxlength' => 20)); ?>
        <?php echo $form->error($model, 'total_view'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'create_time'); ?>
        <?php echo $form->textField($model, 'create_time'); ?>
        <?php echo $form->error($model, 'create_time'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'update_time'); ?>
        <?php echo $form->textField($model, 'update_time'); ?>
        <?php echo $form->error($model, 'update_time'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'ordering'); ?>
        <?php echo $form->textField($model, 'ordering'); ?>
        <?php echo $form->error($model, 'ordering'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->